﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
//using System.Timers;

namespace _9_工具栏_ToolStrip_
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void toolStripStatusLabel1_Click(object sender, EventArgs e)
        {

        }

        private void Timer_Tick(object sender, EventArgs e)
        {
            this.toolStripStatusLabel2.Text = "当前时间：" + DateTime.Now.ToString();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            Timer  timer = new Timer();
            timer.Interval = 1000; // 每秒触发一次
            timer.Tick += Timer_Tick;
            timer.Start();
            this.toolStripStatusLabel2.Text =  "当前时间：" + DateTime.Now.ToString();
        }
    }
}
